package com.fulin.dynamic;

import java.lang.reflect.Proxy;

public class Client {
	public static void main(String[] args) {
		WorkService work = new ChinaWork();
		DynamicWork dynamic = new DynamicWork(work);
		WorkService work1 = (WorkService) Proxy.newProxyInstance(
				WorkService.class.getClassLoader(), 
				new Class[]{WorkService.class}, 
				dynamic);
		work1.say();
		work1.work();
	}
}
